﻿using QBData.Entity;
using System.Linq;
using Dapper;
using System.Data.SqlClient;
using System.Data;
using System.Collections.Generic;
using Kogel.Dapper.Extension.MsSql;

namespace QBData.Dao
{
    /// <summary>
    /// 用户手机查询
    /// </summary>
    public class PhoneDao
    {
        /// <summary>
        /// 获取全部手机号
        /// </summary>
        /// <returns></returns>
        public List<Phone> GetPhoneList()
        {

            return DBContext.DB.QuerySet<Phone>().ToList();
        }

        /// <summary>
        /// 根据手机号获取信息
        /// </summary>
        /// <returns></returns>
        public Phone GetPhoneInfoByINumber(string phoneNumber)
        {
            return DBContext.DB.QuerySet<Phone>().Where(m => m.PhoneNumber == phoneNumber).Get();
        }
    }
}
